using System;
using System.Collections.Generic;
using System.Text;
using ACS.Compiler.Tree.Interfaces;

namespace ACS.Compiler.Tree.Impl
{
    public class CallParameter : TreeBase
    {
        private IExpression _parameter;

        public override void MatchSelect(Select select)
        {
            MatchExpression(select);
        }

        public override void MatchExpression(IExpression expression)
        {
            _parameter = expression;
        }

        public override void MatchCall(Call call)
        {
            MatchExpression(call);
        }

        public override void MatchIdent(Ident ident)
        {
            MatchExpression(ident);
        }

        public override TreeTags Tag
        {
            get { return TreeTags.CallParameter; }
        }

        public IExpression Parameter
        {
            get { return _parameter; }
        }
    }
}
